<?php $header=$this->action('ZfcAdmin\Controller\AdminController', 'headerAction');
	  $baseUrl = $header->headerarray['baseUrl'];
?>
<?php if(isset($_SESSION['admin'])){?>
<html>
	<center>
		<head>
			<?php if(isset($_GET['district_id']) && $_GET['district_id']!=""){?>
			<h1>Edit District</h1>
			<?}else{?>
			<h1>Add District</h1>
			<?}?>
		</head><br/>
		<body>
			<form id="add_dist_form" name="add_dist_form" method="post" action="">
				District: <input type="text" name="dist_name" value="<? if(isset($this->dist_details->district_name) && $this->dist_details->district_name!=""){echo $this->dist_details->district_name;}else{}?>" id="dist_name" placeholder="Please enter district name"><br/><br/>
				<a href="<? echo $baseUrl.'admin/district-lists'?>">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="btn_dist" name="btn_dist" value="Submit" onClick="return add_dist();">
				<input type="hidden" id="hid_dist" name="hid_dist" value="<? if(isset($this->dist_details->district_id) && $this->dist_details->district_id!=""){echo $this->dist_details->district_id;}else{}?>">
			</form>
		</body>
	</center>
</html>
<? } else {?>
<script>
	window.location=ADMIN_BASE_URL+'admin';
</script>
<?}?>
